package com.lh.runmanage.service.Impl;

import com.lh.runmanage.dao.MenuAuthorityMapper;
import com.lh.runmanage.dto.MenuAuthorityDto;
import com.lh.runmanage.dto.MenuAuthorityJ6Dto;
import com.lh.runmanage.model.InPutParam.MenuAuthorityInParam;
import com.lh.runmanage.model.InPutParam.MenuAuthorityJ6InParam;
import com.lh.runmanage.model.InPutParam.MenuHistoryModel;
import com.lh.runmanage.model.InPutParam.WeightNumInParam;
import com.lh.runmanage.model.MenuHistoryListModel;
import com.lh.runmanage.model.WeigthBaseModel;
import com.lh.runmanage.service.MenuAuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：梁昊，后端工程师：梁昊
 * @create 2021-07-21 14:43
 * @function
 * @editLog
 */
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
@Service
public class MenuAuthorityServiceImpl implements MenuAuthorityService {
    @Autowired
    MenuAuthorityMapper menuAuthorityMapper;

    @Override
    public List<MenuHistoryListModel> selectHistoryCount(MenuHistoryModel menuHistoryModel) {
        return menuAuthorityMapper.selectHistoryCount(menuHistoryModel);
    }

    @Override
    public WeigthBaseModel getWeigthNum(WeightNumInParam weightNumInParam) {
        return menuAuthorityMapper.getWeigthNum(weightNumInParam);
    }

    /**
     * 展示端方法：D7
     *
     * @param menuAuthorityInParam 主键
     * @return 界面加权平均值
     */
    @Override
    public List<MenuAuthorityDto> selectMenuAuthorityOrderBy(MenuAuthorityInParam menuAuthorityInParam) {
        return menuAuthorityMapper.selectMenuAuthorityOrderBy(menuAuthorityInParam);
    }

    /**
     * 展示端方法：J6
     *
     * @param menuAuthorityJ6InParam com.lh.runmanage.model.InPutParam.MenuAuthorityJ6InParam
     * @return 界面加权平均值
     */
    @Override
    public List<MenuAuthorityJ6Dto> selectMenuAuthorityByProjectIdAndCreateData(MenuAuthorityJ6InParam menuAuthorityJ6InParam) {
        return menuAuthorityMapper.selectMenuAuthorityByProjectIdAndCreateData(menuAuthorityJ6InParam);
    }

    @Override
    public List<MenuAuthorityDto> selectMenuAuthorityGroupBy(MenuAuthorityInParam menuAuthorityInParam) {
        return menuAuthorityMapper.selectMenuAuthorityGroupBy(menuAuthorityInParam);
    }

}